const http = require('../utils/http')

const HTTP = new http.HTTP()

// 获取社团列表
export function getCommunity(pageNum, pageSize, callback) {
  let params = {
    pageNum,
    pageSize
  }
  HTTP.request('/community/all', 'GET', params, res => {
    callback(res)
  })
}

// 搜索社团
export function searchCommunity(keywords, pageNum, pageSize, callback) {
  let params = {
    keywords,
    pageNum,
    pageSize
  }
  HTTP.request('/community/search', 'GET', params, res => {
    callback(res)
  })
}